package isjinhao.jlox.grammar.expression.represention;

import isjinhao.jlox.lexical.Token;
import isjinhao.jlox.grammar.expression.visitor.ExpressionVisitor;
import lombok.Getter;

/**
 * @Author ISJINHAO
 * @Date 2021/2/22 19:02
 */
@Getter
public class Identifier extends Expression {

    public Identifier(Token name) {
        this.name = name;
    }

    @Override
    public <R> R accept(ExpressionVisitor<R> expressionVisitor) {
        return expressionVisitor.visitVariableExpr(this);
    }

    private final Token name;
}